#include"thread_pool.hpp"
#include"Task.hpp"

using namespace my_threadpool;

int main()
{
    ThreadPool<Task<int>>* tp = new ThreadPool<Task<int>>(3);
    tp->InitPthreadPool();//初始化创建线程池
    srand((long long)time(nullptr));
    while(true)
    {
        Task<int> t(rand()%20+1, rand()%10+1, "+-*/%"[rand()%5]);
        tp->Push(t);
        sleep(1);
    }

}